package br.com.infnet.cultbook.repository.dao.common;

import java.util.List;

import javax.ejb.Local;

@Local
public interface BaseDAO<T> {

	public void persist(T unsaved);
	
	public <T> T persistAndReturn(T unsaved);
	
	public void remove(T saved);
	
	public <T> T findById(Long id);
	
	public List<T> list();
	
	public List<T> list(int page, int size);
	
	public List<T> listLastEntries(int size);

	public int countAll();
	
}
